package com.ocom.payconfig.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.ocom.common.entity.payconfig.EntityMqttDevice;
import com.ocom.common.request.emqx.GetDeviceArgsRequest;
import com.ocom.common.request.payconfig.IotDeviceListRequest;
import com.ocom.common.vo.emqx.GetDeviceArgsVo;
import com.ocom.common.vo.payconfig.DeviceInfoVo;

import java.util.List;

public interface MqttDeviceService extends IService<EntityMqttDevice> {

    List<EntityMqttDevice> getDeviceListByPoint(Long companyId,List<Integer> points);

    boolean save(Long companyId,EntityMqttDevice entityMqttDevice);

    EntityMqttDevice getByDeviceNo(Long companyId,EntityMqttDevice entityMqttDevice);

    EntityMqttDevice getByDeviceId(Long companyId,EntityMqttDevice entityMqttDevice);
    EntityMqttDevice selectDevice(Long companyId,EntityMqttDevice entityMqttDevice);

    boolean update(Long companyId,EntityMqttDevice entityMqttDevice);

    boolean remove(Long companyId,EntityMqttDevice entityMqttDevice);

    PageInfo<EntityMqttDevice> page(Long companyId, IotDeviceListRequest request, EntityMqttDevice entityMqttDevice);
    EntityMqttDevice getDeviceListByDeviceNo(Long companyId,String deviceNo);

    void updateByDeviceNo(Long companyId,EntityMqttDevice entityMqttDevice);

    void updateByDeviceNoOnlineState(Long companyId,List<String> deviceNos);

    //3.18根据消费点返回物联网设备参数
    List<EntityMqttDevice> getDeviceArgs(GetDeviceArgsRequest request);

    Integer getMaxOrderId(Long companyId);


     DeviceInfoVo selectPointId(Long companyID, String machno);


}
